<!DOCTYPE html>
<html lang="en" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <meta charset="UTF-8">
    <title>custom main page</title>
</head>
<body>
<section sec:authorize="isAuthenticated()">
    <h1>main.html</h1>
    <ul>
        <li>username: <strong sec:authentication="name"></strong></li>
        <li>roles: <strong sec:authentication="principal.authorities"></strong></li>
        <li>principal: <strong sec:authentication="principal"></strong></li>
    </ul>
</section>
</body>
</html>